package com.block.datapush.form.item.util;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

public class ZaiYangUtil {

    public static String getLoanAmount(String loanAmount) {
        if (StrUtil.equals(loanAmount, BaseTypeInfoEnum.LoanAmount.la001.getValue())){
            return "2";
        }else if (StrUtil.equals(loanAmount, BaseTypeInfoEnum.LoanAmount.la002.getValue())){
            return "3";
        }else if (StrUtil.equals(loanAmount, BaseTypeInfoEnum.LoanAmount.la003.getValue())){
            return "4";
        }
        return "2";
    }


    public static String getGjj(String gjj) {
        if (StrUtil.equals(gjj, BaseTypeInfoEnum.Gjj.gjj001.getValue())){
            return "1";
        }else if (StrUtil.equals(gjj, BaseTypeInfoEnum.Gjj.gjj002.getValue())){
            return "2";
        }
        return "1";
    }

    public static String getCar(String car) {
        if (StrUtil.equals(car, BaseTypeInfoEnum.Car.car001.getValue())){
            return "1";
        }else if (StrUtil.equals(car, BaseTypeInfoEnum.Car.car002.getValue())){
            return "3";
        }
        return "1";
    }


    public static String getHouse(String house) {
        if (StrUtil.equals(house, BaseTypeInfoEnum.House.hu001.getValue())){
            return "1";
        }else if (StrUtil.equals(house, BaseTypeInfoEnum.House.hu002.getValue())){
            return "3";
        }
        return "1";
    }


    public static String getZhiMa(String zhima) {
        if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm005.getValue())){
            return "1";
        }else if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm004.getValue())){
            return "2";
        }else if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm003.getValue())){
            return "3";
        }else if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm002.getValue())){
            return "4";
        }
        return "4";
    }

    public static String getBaoXian(String insurance) {
        if (StrUtil.equals(insurance, BaseTypeInfoEnum.Insurance.in001.getValue())){
            return "1";
        }else if (StrUtil.equals(insurance, BaseTypeInfoEnum.Insurance.in002.getValue())){
            return "3";
        }
        return "1";
    }

    public static String getSheBao(String socialInsurance) {
        if (StrUtil.equals(socialInsurance, BaseTypeInfoEnum.SocialInsurance.si001.getValue())){
            return "1";
        }else if (StrUtil.equals(socialInsurance, BaseTypeInfoEnum.SocialInsurance.si002.getValue())){
            return "2";
        }
        return "1";
    }

    public static String getYuQi(String yuqi) {
        if (StrUtil.equals(yuqi, BaseTypeInfoEnum.Yuqi.yq001.getValue())){
            return "2";
        }else if (StrUtil.equals(yuqi, BaseTypeInfoEnum.Yuqi.yq002.getValue())){
            return "4";
        }
        return "1";
    }

}
